#include <iostream>
#include	<math.h>
#include "object.h"

object::object()
{
    this->forward.x = 0;
    this->forward.y = -1;
    this->forward.z = 0;
    //ctor
}

object::~object()
{
}

void    object::draw()
{
    std::cout << "object" << std::endl;
}

void    object::update()
{
}

void    object::move(vec3 vect)
{
    pos.x += vect.x;
    pos.y += vect.y;
    pos.z += vect.z;
}

void    object::rotatex(float a)
{
    float x = forward.x;
    float y = forward.y;
    forward.x = x * cos(a) - y * sin(a);
    forward.y = x * sin(a) + y * cos(a);
}

void    object::rotatez(float a)
{
    float y = 1;
    float z = forward.z;
    forward.z = y * sin(a) + z * cos(a);
}
